﻿#include "SpriteD3D.h"

Sprite::SpriteD3D::SpriteD3D( void ):m_IDevice10(NULL)
{
	D3DXMatrixIdentity(&m_pProjMat);
}

HRESULT Sprite::SpriteD3D::initD3D( HWND HMainWnd,int nWidth,int nHeight )
{
	this->m_HMainWnd = HMainWnd;
	m_nWidth = nWidth;
	m_nHeight = nHeight;
	return S_OK;
}

Sprite::SpriteD3D::~SpriteD3D( void )
{
		ReleaseCOM(m_IDevice10);
}

void Sprite::SpriteD3D::resetOMTargetsAndViewport()
{

}

void Sprite::SpriteD3D::onResize()
{

}

void Sprite::SpriteD3D::onResize( int nWidth,int nHeight )
{
	m_nWidth = nWidth;
	m_nHeight = nHeight;
	this->onResize();
}


void Sprite::SpriteD3D::clear()
{

}

void Sprite::SpriteD3D::begin()
{

}

void Sprite::SpriteD3D::end()
{

}

ID3D10Device* Sprite::SpriteD3D::getDevice10()const
{
//	assert(ID3D10Device!=NULL);
	return m_IDevice10;
}

Sprite::SpriteMat Sprite::SpriteD3D::getProj()
{
	return m_pProjMat;
}


Sprite::SpriteD3D* Sprite::g_pCD3d = NULL;